@echo off
set key="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
set value="mainTest"
set "path=%~dp0main.exe"

reg add %key% /v %value% /t REG_SZ /d "%path%" /f

if %errorlevel%==0 (
    echo "yes"
) else (
    echo "no"
)

pause
